﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using F_MODEL;
using System.Data;
using System.Data.SqlClient;

namespace F_DAL
{
   public class send_pay
    {
        /// <summary>
        /// 寄件待支付-货物信息
        /// </summary>
        /// <returns></returns>
        public List<Mails> ji_pay(int id)
        {
            SqlParameter[] paramter ={
                               new  SqlParameter("@Userid",SqlDbType.Int){Value=id}
                               };
            SqlDataReader read = DbHelperSQL.RunProcedure("[dbo].ji_pay", paramter);
            List<Mails> list = new List<Mails>();
            while (read.Read())
            {
                Mails us = new Mails();
                us.mailId = Convert.ToString(read["mailId"]);
                us.types1 = Convert.ToString(read["types1"]);
                us.dweight = read["dweight"].ToString();
                us.predictPrice = Convert.ToDecimal(read["predictPrice"]);
                us.sendUser = read["sendUser"].ToString();
                us.ParCeId = Convert.ToInt32(read["ParCeId"]);
                us.goodsType = Convert.ToInt32(read["goodsType"]);
                us.goodsName = Convert.ToString(read["goodsName"]);
                us.goodsNum = Convert.ToInt32(read["goodsNum"]);
                us.goodsRemark = Convert.ToString(read["goodsRemark"]);
                list.Add(us);
            }
            return list;
        }


    }
}
